home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / sys / amiga / applications / 433 < prev    next >
Encoding:
Text File  |  1996-08-05  |  4.6 KB  |  176 lines

  1. Newsgroups: comp.sys.amiga.applications
  2. Path: fnnews.fnal.gov!unixhub!news
  3. From: wglp09@scsa1.slac.stanford.edu (W.G.J. Langeveld)
  4. Subject: Re: Any Maple Patches Needed/Available?
  5. Content-Type: text/plain; charset=iso-8859-1
  6. Message-ID: <DKzCLG.945@unixhub.SLAC.Stanford.EDU>
  7. Sender: news@unixhub.SLAC.Stanford.EDU
  8. Content-Transfer-Encoding: 8bit
  9. Organization: Stanford Linear Accelerator Center
  10. X-Newsreader: Interworks_GRn 3.0b11 September 9, 1995
  11. References: <51491923@heliosamiga.uni-frankfurt.de> <4a93iq$kph@natasha.rmii.com> <4apjp0$kva@ra.nrl.navy.mil> <66482050@stanley.zebra.fh-weingarten.de> <DKvyp7.48t@unixhub.SLAC.Stanford.EDU> <4cuvcs$gaj@sarajevo.bmc.com>
  12. Mime-Version: 1.0
  13. Date: Wed, 10 Jan 1996 19:24:52 GMT
  14.  
  15. In article <4cuvcs$gaj@sarajevo.bmc.com> Joe Veazey <jveazey> writes:
  16. > PMFJI:
  17. > What is the status of any patches etc. for Maple V R3 for the Amiga?
  18. > Specifically, the WorkBench palette problem, and fixes for any other bugs found
  19. > since release.
  20.  
  21. I sent you the palette problem patch in e-mail, but I might as well post it
  22. again here in this newsgroup. There's no word yet on any other patches. It
  23. would probably be a good idea to directly request a patch release from
  24. Maplesoft - they do not monitor this news group, and whether or not any 
  25. further patches will come about is their decision.
  26.  
  27.     Willy.
  28.  
  29. -----------------------------------------------------------------------
  30. /** FixMapleVR3.rexx
  31. *
  32. *   Applies patches to programs that require no major changes.
  33. *   Just run from a shell.
  34. *
  35. *   W.G.J. Langeveld, 3 October 1995.
  36. *
  37. **/
  38. progname = "MapleVR3"
  39. progloc  = "maple:"
  40.  
  41. patchtext.0 = 5
  42. patchtext.1 = "Before displaying the Maple logo, it changes the Workbench"
  43. patchtext.2 = "colors so the logo will be displayed in the proper colors."
  44. patchtext.3 = "Unfortunately, it doesn't restore the colors properly after"
  45. patchtext.4 = "it has displayed the logo - it restores pen 4 correctly,"
  46. patchtext.5 = "but changes pens 5, 6 and 7 to the same (pen 4's) color."
  47.  
  48. patches.0        = 3
  49. patches.1.loc    = 1353
  50. patches.2.loc    = 1367
  51. patches.3.loc    = 1381
  52. patches.1.before = '04'x
  53. patches.2.before = '04'x
  54. patches.3.before = '04'x
  55. patches.1.after  = '05'x
  56. patches.2.after  = '06'x
  57. patches.3.after  = '07'x
  58.  
  59. call Patch
  60.  
  61. exit 0
  62.  
  63.  
  64. /**
  65. *
  66. *   Simple general patch procedure
  67. *
  68. **/
  69. Patch: procedure expose progname progloc patchtext. patches.
  70.    name = progloc || progname
  71.  
  72.    check = addlib('rexxsupport.library', 0, -30, 0)
  73.  
  74. /*
  75. *   Say what we're about to do
  76. */
  77.    say "The currently shipping version of" progname "has the following bug."
  78.    do i = 1 to patchtext.0
  79.       say patchtext.i
  80.    end
  81.    say ""
  82.    say "This program will patch this. It assumes" progname "is in" progloc
  83.    say "and it will create a backup copy of" progname "before applying"
  84.    say "the patch."
  85.    say ""
  86. /*
  87. *   Ask for permission
  88. */
  89.    options prompt "Continue? [Y/N]: "
  90.  
  91.    do i = 1
  92.       pull answer
  93.       answer = substr(upper(strip(answer)), 1, 1)
  94.       if answer = "Y" then leave
  95.       else if answer = "N" then exit 0
  96.       say "Invalid response."
  97.    end
  98. /*
  99. *   Check if file exists
  100. */
  101.    if ~exists(name) then do
  102.       say "Can't find" name ||"!"
  103.       say "Aborting patch..."
  104.       return 0
  105.    end
  106.  
  107.    if ~open(infile, name, R) then do
  108.       say "Can't open" name "for read access!"
  109.       say "Aborting patch..."
  110.       return 0
  111.    end
  112. /*
  113. *   Check the original values of the places to be patched
  114. */
  115.    needpatch = 0
  116.    do i = 1 to patches.0
  117.       call seek(infile, patches.i.loc, "B")
  118.       s = readch(infile, 1)
  119.       if s ~= patches.i.before then do
  120.          if s ~= patches.i.after then do
  121.             say "File" name "is not the original file!"
  122.             say "Aborting patch..."
  123.             return 0
  124.          end
  125.       end
  126.       else do
  127.          needpatch = needpatch + 1
  128.       end
  129.    end
  130.  
  131.    call close(infile)
  132. /*
  133. *   Check if we need the patch
  134. */
  135.    if needpatch = 0 then do
  136.       say "This patch was already applied!"
  137.       return 0
  138.    end
  139. /*
  140. *   Make a backup
  141. */
  142.    address COMMAND "copy" name name ||".backup"
  143. /*
  144. *   Check it was indeed created
  145. */
  146.    if ~exists(name || ".backup") then do
  147.       say "Unable to create backup file!"
  148.       say "Aborted..."
  149.       exit 0
  150.    end
  151. /*
  152. *   Apply the patches for real
  153. */
  154.    if ~open(infile, name, A) then do
  155.       say "Can't open" name "for append access!"
  156.       say "Aborted..."
  157.       exit 0
  158.    end
  159.  
  160.    do i = 1 to patches.0
  161.       call seek(infile, patches.i.loc, "B")
  162.       call writech(infile, patches.i.after)
  163.    end
  164.  
  165.    call close(infile)
  166.  
  167.    say "Patch applied successfully!"
  168.  
  169.    return 0
  170. -----------------------------------------------------------------------
  171.  
  172. -- 
  173. W.G.J. Langeveld - SLAC | e-mail: wglp09@scsa1.slac.stanford.edu
  174.                         |         langeveld@bix.com
  175.